triangle_circumcenter_2d Interface

interface
public subroutine triangle_circumcenter_2d(t, center)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: t(2,3)
real(kind=real64), intent(out) :: center(2)

Description

Computes the circumcenter of a triangle in 2D.

The circumcenter of a triangle is the center of the circumcircle, the circle that passes through the three vertices of the triangle.

The circumcircle contains the triangle, but it is not necessarily the smallest triangle to do so.

If all angles of the triangle are no greater than 90 degrees, then the center of the circumscribed circle will lie inside the triangle. Otherwise, the center will lie outside the circle.

The circumcenter is the intersection of the perpendicular bisectors of the sides of the triangle.

In geometry, the circumcenter of a triangle is often symbolized by "O".